from git import Repo
import os



os.system('git status')
cmd = input('Git: pull[0], or push[9]: ')

repo = Repo('./')
g = repo.git

if cmd == '0':
    try:
        g.pull()
        print('Pull OK')
    except:
        print('Pull failed!')

elif cmd == '9':

    

    try:
        g.add('.')
        g.commit('-m autopush')
        g.push()
        print('Push OK')
    except:
        print('Push failed!')
    
else:
    print('Nothing done!')
    


